package demo.standard;

public class ConcreteStateA implements IState {

    @Override
    public void behavior1(Context context) {
        // do something
        //....
        // 状态迁移
        context.setState(new ConcreteStateB());
        System.out.println("状态ConcreteStateA完成行为1-->迁移到状态ConcreteStateB");
    }

    @Override
    public void behavior2(Context context) {
        System.out.println("状态ConcreteStateA不支持行为2");
    }
}
